package com.google.code.syncgear.util;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

public final class PropertyUtil {

	private static Configuration CONFIG;

	private static boolean isInitFailure = false;

	static {
		try {
			CONFIG = new PropertiesConfiguration("syncgear.properties");
		} catch (ConfigurationException e) {
			isInitFailure = true;
		}
	}

	public static String getProperty(String key) {
		if (isInitFailure)
			return null;
		return CONFIG.getString(key);
	}

}
